class Innate_Skill_008 < Innate_Skill
  attr_accessor :count
  def initialize(actor)
    super(actor)
    @name = '次元光束'
    @type = 4
    @description = '发生多束大型激光，对全体敌人造成多段伤害，根据攻击力等比增加伤害'
    @icon_name = "nova-s-04"
    @target_mode = 2
  end
  def use
    super
    @count = 0
    make_actions
    action = Action_Bit.new(@actor, 1)
    action.set_detail(106).set_block
    action = action_flow.add_action(action)
    damge_info = make_damge_info(@actor.calc_atk(150))
    for item in $game_troop.enemies
      if not item.dead?
        damage_action = Action_Bit.new(item, 2)
        damage_action.set_detail(damge_info)
        action_flow.add_action(damage_action)
      end
    end
    make_actions
    action_flow.submit
  end
  def make_actions
    for i in 0...3 do
      action = Action_Bit.new(@actor, 1)
      action.set_detail(i % 2 == 0 ? 104 : 105).set_block
      action = action_flow.add_action(action)
      for item in $game_troop.enemies
        if not item.dead?
          damge_info = make_damge_info(@actor.calc_atk(150))
          damage_action = Action_Bit.new(item, 2).set_detail(damge_info)
          action_flow.add_action(damage_action)
        end
      end
    end
  end
  def next_level_description
    return "伤害增加"
  end
end
